package C;

import java.util.Scanner;
import java.util.StringJoiner;

public class C73 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        System.out.println(getResult(input));
    }

    public static String getResult(String input) {
        String[] words = input.split("[^0-9a-zA-Z\\-]");
        StringJoiner sj = new StringJoiner(" ");
        for (int i = words.length-1; i >= 0; i--) {
            String s = words[i];
            if (s.equals("")) continue;
            if (s.charAt(0)=='-' && words[i].charAt(s.length()-1)=='-'){
                s = words[i].substring(1,s.length()-1);
            }
            String[] subString = s.split("-{2,}");
            for (String s1 : subString) {
                sj.add(s1);
            }
        }
        System.out.println(words[6]);
        return sj.toString();
    }
}
